package utils;

import java.util.Comparator;

import model.trajectory.BaseTrajectoryModel;

import view.trajectory.BaseTrajectoryView;

public class TrajectoryComparator implements Comparator<BaseTrajectoryView> {

	@Override
	public int compare(BaseTrajectoryView arg0, BaseTrajectoryView arg1) {
		BaseTrajectoryModel firstModel = ((BaseTrajectoryModel)arg0.getModel());
		BaseTrajectoryModel secondModel = ((BaseTrajectoryModel)arg1.getModel());
		if(firstModel.intervalle.beginTime < secondModel.intervalle.beginTime)
		{
			return -1;
		}
		else
		{
			return 1;
		}
	}

}
